package com.ys.enume.eKnowAi;

public class EknowCodeEnum {

	//百度接口返标识
	public enum ApiRetuenCode {
		OVERTIMES("当日会话超出限制", 1),
		NOSET("没有配置完全", 2),
		NOMORE("没有更多", 3),
		CANNOT("不能操作", 4),
		NOBASE("无知识库", 5),
		HASSCENE("已绑定场景", 6),
		HASTYPENODEL("分类未删除", 7),
		HASTIMERSETNODEL("分类已绑定定时器", 8),
		SUCCESS("成功", 0),
		FAIL("失败", -1),
		PARAMSERROR("参数有问题，请重试", -2);
		public String msg;
		public Integer value;

		private ApiRetuenCode(String msg, Integer value) {
			this.msg = msg;
			this.value = value;
		}

		public static String getMsg(int value) {
			for (ApiRetuenCode e : ApiRetuenCode.values()) {
				if (e.value == value) {
					return e.msg;
				}
			}

			return "";
		}

	}
}
